var baseurl = "<%=ViewUtil.getRequestPath(request)%>";
var sysId;
var deptId;
var orgId;
var userId;
var myDatagrid;//数据表格
var iframeWidth;
var myColNumbers;
var baseUrl;

$(function() {
    myDatagrid = $('#manualManagerDataGrid');
    setFitColumns();
});
/**
 * 设置fitColNumber属性
 */

function setFitColumns() {
        $('#manualManagerDataGrid').datagrid(
                {
                    url : 'platform/employeeshortcutController/getEmpItem'
                });
}
//编辑
function  edit() {
    if(aa==null || aa == undefined){
        $.messager.alert('提示','请选择要编辑的快捷键！','warning');
        return;
    }
    var ID=aa.substring(4,5);
    var url = "avicit/im/lantop/employeeshortcutkeys/jsp/employeeshortcutkeysedit.jsp?ID="+ID;
    title ="编辑";
    var content = '<iframe id="vpn" src="' + url + '" width=100%" height="99%" frameborder="0" scrolling="yes"></iframe>';
    var boarddiv = '<div id="remind" title="' + title + '" style="overflow:hidden;"></div>';//style="overflow:hidden;"可以去掉滚动条
    $(document.body).append(boarddiv);
    $('#remind').show();
    $('#remind').dialog({
        content: content, width: 600, height: 300, modal: false, title: title,
        onClose : function() {
            $(this).dialog('destroy');
            $(this).remove();
        }
    });
}

//添加序号
function getPageSize(value, row, index){
    index+=1;//设置起始序号为1，如果不加这行代码序号就会从0开始
    return index++;//根据行的数量不断自增
}


function chk(value, row, index) {
    return '<input dir="true" style="width:17px;height: 18px;*margin-top:-3px;-webkit- margin-top: 1px;" onclick="chc(\'abc_'+value+'\','+index+')" type="checkbox"  id="abc_'+value+'"  style=""  name="checkbox2q"  value="'+value+'"/>';
}
var aa;
var index;
function chc(id,index){
    if($("#"+id).is(':checked')){
        if ( aa != undefined || aa!=null){
            $("#"+aa)[0].checked=false;
        }
        aa=id;
    }else{
        aa=undefined;
    }
}
